Fix vcpu hotplug bug: transfer vcpu_avail hex string to qemu
authorKeir Fraser <keir.fraser@citrix.com>
Sat, 20 Mar 2010 07:35:04 +0000 (07:35 +0000)
committerKeir Fraser <keir.fraser@citrix.com>
Sat, 20 Mar 2010 07:35:04 +0000 (07:35 +0000)
Currently qemu has a bug: When maxvcpus > 64, qemu will get wrong
vcpu bitmap (s->cpus_sts[i]) since it only get bitmap from a long
variable.

This patch, cooperate with another qemu patch, is to fix this bug.
This patch transfer a vcpu_avail string in a hex string format, so
that at qemu side it's more easier to get vcpu bitmap from hex string,
especially when many vcpus, like more than 64.

(Also update QEMU_TAG for matching qemu-side update)

Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com>
Config.mk
tools/python/xen/xend/image.py

index cae39ed8cd9a57f7c9c1fd8f0b303568fcec4371..e31357734e5d1ffb5495e3fdfe6706faa865ef34 100644 (file)
--- a/Config.mk
+++ b/Config.mk
@@ -153,10 +153,9 @@ QEMU_REMOTE=http://xenbits.xensource.com/git-http/qemu-xen-unstable.git
 # CONFIG_QEMU ?= ../qemu-xen.git
 CONFIG_QEMU ?= $(QEMU_REMOTE)
 
-QEMU_TAG := xen-4.0.0-rc6
-#QEMU_TAG ?= e5d14857cd67490bf956d97c8888c0be95ed3f78
-# Thu Feb 18 15:36:29 2010 +0000
-# When xen_platform_pci=0 also disable fixed Xen platform ioports
+QEMU_TAG ?= 435718fb726b80462b4028128301dcf92214cc6a
+# Thu Mar 18 16:48:03 2010 +0000
+# Fix const-correctness in dma bitmap hex parser
 
 OCAML_XENSTORED_REPO=http://xenbits.xensource.com/ext/xen-ocaml-tools.hg
 
index f3b2cc544b81a13aee3007686ffc06f08c735e48..7f99a699dfe96b4706a57bccd5a0820c64eeca3f 100644 (file)
@@ -838,7 +838,7 @@ class HVMImageHandler(ImageHandler):
     def parseDeviceModelArgs(self, vmConfig):
         ret = ImageHandler.parseDeviceModelArgs(self, vmConfig)
         ret = ret + ['-vcpus', str(self.vm.getVCpuCount())]
-        ret = ret + ['-vcpu_avail', str(self.vm.getVCpuAvail())]
+        ret = ret + ['-vcpu_avail', hex(self.vm.getVCpuAvail())]
 
         if self.kernel:
             log.debug("kernel         = %s", self.kernel)